<template>
  <div class="bargain_conainer">
    <div class="kan" @click="kan">全民砍价></div>
    <div
      class="bargain_item"
      v-for="(item, index) in bargain"
      :key="index"
      v-show="index >= 10 && index <= 11"
      @click="kan"
    >
      <div class="bargain_img">
        <img :src="item.pic" />
      </div>
      <div class="bargain_content">
        <div class="bargain_content_title">{{ item.name }}</div>
        <div class="bargain_content_desc">{{ item.characteristic }}</div>
        <div class="bargain_container_count">
          <div class="bargain_count_items">
            <div class="bargain_count_item">
              <p class="lowPrice_num">￥{{ item.minPrice }}</p>
              <p class="lowPrice_text">低价</p>
            </div>
            <div class="bargain_count_item">
              <p class="oriPrice_num">￥{{ item.originalPrice }}</p>
              <p class="oriPrice_text">原价</p>
            </div>
            <div class="bargain_count_item">
              <p class="salePrice_num">{{ item.stores }}件</p>
              <p class="salePrice_text">限量</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bargain: [],
    };
  },
  mounted() {
    this.$API.getShopList().then((res) => {
      // console.log(res.data.data)
      this.bargain = res.data.data;
    });
  },
  methods: {
    kan() {
      this.$router.push({
        path: "./bargainList",
      });
    },
  },
};
</script>

<style scoped>
.bargain_conainer {
  margin-top: 25px;
  background-color: white;
}
.kan {
  width: 100%;
  height: 0.6rem;
  text-align: center;
}
.bargain_item {
  width: 100%;
  height: 2.8rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 0.01rem solid #eee;
}
.bargain_img {
  width: 35%;
  height: 2.5rem;
}
.bargain_img img {
  margin: 0.1rem;
  width: 100%;
  height: 100%;
  border-radius: 0.1rem;
}
.bargain_content {
  width: 60%;
}
.bargain_content_title {
  font-size: 0.3rem;
  color: #333;
  margin: 0.1rem 0;
}
.bargain_content_desc {
  font-size: 0.2rem;
  color: #666;
  margin: 0.1rem 0;
}
.bargain_container_count {
  width: 70%;
  height: 0.5rem;
  margin-top: 0.4rem;
}
.bargain_count_items {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bargain_count_item {
  font-size: 0.25rem;
  color: #666;
}
.lowPrice_num {
  color: red;
  font-weight: bold;
}
.lowPrice_text {
  color: black;
}
</style>